package com.xinchao.dao;

import com.xinchao.model.AsstRoute;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface AsstRouteMapper {
    int deleteByPrimaryKey(Long id);

    int insert(AsstRoute record);

    int insertSelective(AsstRoute record);

    /**
     * 根据主键查找对象
     * @param id 路线id
     * @return
     */
    AsstRoute selectByPrimaryKey(Long id);

    int updateByPrimaryKeySelective(AsstRoute record);

    int updateByPrimaryKey(AsstRoute record);

    /**
     * 根据城市编码获取路线列表
     * @param cityCode 城市编码
     * @return
     */
    List<AsstRoute> getRouteByCity(@Param("cityCode") String cityCode);

    /**
     * 通过路线version查找对象
     * @param routeVersion 路线version
     * @param cityCode 城市编码
     * @return
     */
    AsstRoute getRouteByRouteVersion(@Param("routeVersion") Long routeVersion, @Param("cityCode") String cityCode);
}